#ifndef PEER
#define PEER

#include <iostream>
#include <fstream>
#include <sstream>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <pthread.h>
#include <netdb.h>
#include <cstring>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include "theEncryptor.h"
#include "channelManager.h"
#include "comms.h"


class client : public comms
{
public:
	client();
	~client();

	void establishServerConnection(const char *hostname, int portno);
	void startClientThread(const char *hostname, int portno);
	static void *runClient(void* args);

	struct accessHelper
	{
		client* This;
		void* actual_arg ;
		std::string hostname;
		int portno;
		accessHelper( client* t, void* p, std::string hostname_,int portno_ )
		: This(t), actual_arg(p),hostname(hostname_),portno(portno_) {}
	};

};


#endif
